home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / WU-FTPD-.{2P / FIXES-2_.{12 < prev    next >
Text File  |  1999-09-17  |  9KB  |  189 lines

  1. This is a lot of changes to wu-ftpd 2.4.2 beta 18, largely for future
  2. portability - i.e. to make it easier to move to new systems and to
  3. defend itself against C9X.  It also includes a few enhancements.  Not
  4. all of the changes have been fully tested, but they have been built and
  5. the ftpd tested under HI-UX/WE2, HI-OSF/1-MJ, HI-UX/MPP and SGI Irix 6.4
  6. and 6.5.  It has also been compiled under Debian Linux (1.3.1), Solaris
  7. 2.5, HP-UX 9.03, Digital Unix 3.2 and Ultrix 4.3 and partially tested
  8. under the first.
  9.  
  10. Note that I regard full testing as execution of EVERY conditional and
  11. EVERY path, and so is much more rigorous than is nowadays common.  I
  12. have tested the changes at least much as most vendors do to their
  13. software before full release :-(
  14.  
  15. Here is a summary of the changes:
  16.  
  17.     1) The makefiles are built differently, in that the system-dependent
  18. ones contain ONLY the system-dependent settings and the dependencies and
  19. rules are appended to the end.  This has not been done to the top level
  20. makefiles, as the installation process is so system-dependent (and just
  21. plain messy) anyway.
  22.  
  23. This was done because it made it feasible to sort out various minor
  24. problems.  For example, Emacs backups (*~ files) were being removed from
  25. only some directories, and the previous scripts would not rebuild if
  26. only headers had been changed.  The latter could also be done by
  27. makedepend, if that had been included, but this method is simpler and
  28. more reliable.
  29.  
  30. VR10: His changes were incomplete and, in many cases, incorrect.  I've
  31. fixed the errors and finished his work.
  32.  
  33.     2) Some fixes were put into the HI-UX/WE2 configuration, and one
  34. for HI-UX/MPP and HI-OSF/1-MJ added.  These are wildly different, and
  35. so should not share a set.
  36.  
  37.     3) All logging messages in src/ftpd.c that contain a source
  38. identification have been updated to include the authenticated user, if
  39. available.  This makes the RFC 931 option actually worthwhile!  This
  40. accounts for the largest number of lines changed, but the changes are
  41. very routine.
  42.  
  43. VR10: Finished up his work to bring it up to VR10 patch level.  No way
  44. he could have known about all the new log messages unless he was using
  45. VR9.
  46.  
  47.     4) Some near-trivial changes to the authentication code (mainly
  48. src/authenticate.h and support/authuser.c), to improve RFC 931
  49. selection, which is site- rather than system-dependent.  A comment has
  50. been put into config.h to indicate this.
  51.  
  52.     5) access.c and ftpcount.c failed to compile with a standard
  53. compiler on a system with K&R <unistd.h> headers, because 'pid_t *' and
  54. 'char *' are not compatible.  Weeble.
  55.  
  56. VR10: On _his_ so-called 'standard' compiler.  Worked fine on others.
  57. The changes were correct, though.
  58.  
  59.     6) The old K&R equivalence between int and void functions finally
  60. breaks in C9X, so that has been kludged up, mainly in src/ftpcmd.y.  It
  61. was pretty dubious in C89, but not actually forbidden - it is a
  62. constraint error in C9X.
  63.  
  64. VR10: What he's saying here is the code wasn't up to ANSI-C standards
  65. but the current (1998) standard allows it for compatability while the
  66. forthcoming standard may not.  The changes should be there for general
  67. clarity regardless of the state of the C standard.
  68.  
  69.     7) popen.c assumed that SVR4 and _OSF_SOURCE would never be set
  70. together; well, they can be ....
  71.  
  72. VR10: Probably a good idea, but I get the impression all his work is
  73. largely to support a new platform and has little or nothing to do with
  74. the forthcoming C standard.
  75.  
  76.     8) glob.c had a breach of the type rules so obscure that it had me
  77. staring at the code for an hour wondering why the compiler was
  78. diagnosing an apparently correct statement.  It was right.
  79.  
  80. VR10: Change is dubious at best.  He's really complaining that the target
  81. he was compiling on didn't handle char-to-int like others the daemon runs
  82. on.
  83.  
  84.     9) Some occurrences of 'return; break;' have had the break commented
  85. out, to reduce the number of warnings about unreachable code.  This may
  86. introduce them on other machines, but I think the changed state will be
  87. quieter.  Both sets of code are correct.
  88.  
  89. VR10: Bah!  Dead code is dead code and if a compiler doesn't like it being
  90. removed, that's the compiler's problem.
  91.  
  92.    10) Some extremely ancient configuration and makefile options were
  93. changed to correspond with the systems and compilers now used - Digital
  94. Unix needed most changes.  I find it difficult to believe that nobody
  95. has reported that they were incompatible with version 3.2, as the
  96. current version is 4.something.
  97.  
  98. VR10: DEC users were complaining.  Noone was listening.  VR9 already had
  99. all his changes.
  100.  
  101.    11) Several HP-specific hacks were given a name and set in the config
  102. files, as they are needed for Hitachi systems, too.
  103.  
  104.    12) The lack of utmpx was given a name and set in the config files,
  105. as there are now half a dozen such systems.
  106.  
  107. VR10: Probable Hitachi-ism.
  108.  
  109.    13) Some cases of implicit int on variables were fixed up.  While
  110. these remain correct, they have been deprecated practice for years.
  111.  
  112.    14) The STUPID_SPRINTF hack has been made standard, because it works
  113. in all cases,the efficiency loss is negligible, and it clarifies the
  114. code considerably.
  115.  
  116. VR10: VR9 already had most of his clean-up.  All he did was make this the
  117. normal case and remove the old, broken single-call case.
  118.  
  119.    15) The horrible <sys/time.h> hack was given a name and set in the
  120. config files.  Heaven alone knows why Linux and Hitachi systems are the
  121. only ones that seem to need it!
  122.  
  123. VR10: Dunno why Hitachi does, but Linux needs it because of their lame
  124. #include layout.
  125.  
  126.    16) Some cases where exit was used to return from main were changed
  127. to return, as that produces less messages and is somewhat cleaner.
  128.  
  129.    17) Some comments on how to set the syslog facility and pathnames
  130. have been put into config.h.  The facility could be set there if the
  131. src/config/config.* were modified to default FACILITY after the
  132. inclusion of config.h rather than before.
  133.  
  134.    18) I added a USE_USR to src/pathnames.h for the systems that use
  135. /usr/adm.
  136.  
  137.    19) I edited config.h and src/config/config.* to allow the paths to
  138. be specified centrally, if a site wants to use a different convention,
  139. but the result was so horrible that I backed off.  This area needs
  140. some improvement.
  141.  
  142.    20) One H* change has the effect of printing the local name twice in
  143. the transfer log, instead of the local and remote user.  It doesn't
  144. appear to have any useful effect, so I have commented it out.
  145.  
  146.    21) The default buffer sizes used for binary transfers are far too
  147. low for efficiency on many systems, so I have added an option to specify
  148. the buffer size directly, and commented it in config.h.
  149.  
  150. VR10: Read 'many' as 'Hitachi' here.  This change fixes the malloc()
  151. problem on AIX, though.
  152.  
  153.    22) The code has been fixed to print file sizes as double, and not as
  154. long, because **** C9X breaks the traditional rule that long is the
  155. longest integer type.  Yes, I really do mean that C9X intends to change
  156. the language sufficiently that it is not possible to write portable
  157. file-handling code that will work correctly in both C89 and C9X, let
  158. alone K&R.
  159.  
  160. Furthermore, the previous code will ALREADY print wrong answers on some
  161. systems for files of above 2^31 bytes, so radical changes were
  162. essential.  Also, src/extensions.c had a serious bug, where it assumed
  163. that (struct stat).st_size was compatible with an int, and nobody seems
  164. to have noticed.  It did the same for time_t, too :-(
  165.  
  166. The code that I have written is a LOT cleaner, and MUCH more portable,
  167. but does assume not-totally-broken floating-point - it doesn't need -lm.
  168. There used to be some completely knotted systems, but I haven't heard of
  169. any in over a decade.  The efficiency is irrelevant, as it is only a few
  170. conversions per transfer.
  171.  
  172. WARNING: this will give approximate (but NOT misleading) results if any
  173. system can create files whose sizes cannot be held in a double without
  174. loss of precision.  While the C89 and C9X standards permit this, I don't
  175. know of any systems that are so deficient.  There is NO other way to
  176. resolve this problem even remotely reliably in advance of being able to
  177. assume C9X.  I thought of adding yet more preprocessor conditionals, but
  178. the spaghetti was bad enough already, and the double kludge is extremely
  179. safe in practice.
  180.  
  181. VR10: His changes were lame and stupid.  What he found was that the
  182. format strings for size_t and time_t were incorrect on some systems.  The
  183. code already knew that.  He was confused by the STUPID_SPRINTF functions.
  184. VR9 cleaned all that up considerably.  I've changed his stuff back to the
  185. original, then used the correct format strings (L_FORMAT and T_FORMAT) in
  186. the printf() statements.  He'll need to add a test for his C-199x compiler
  187. on his Hitachi box and set the proper format strings in ftpd.c and
  188. extensions.c
  189.